package cn.itsource.pet.service.impl;

import cn.itsource.pet.domain.PetDetail;
import cn.itsource.pet.mapper.PetDetailMapper;
import cn.itsource.pet.service.IPetDetailService;
import cn.itsource.basic.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zj
 * @since 2022-12-12
 */
@Service
public class PetDetailServiceImpl extends BaseServiceImpl<PetDetail> implements IPetDetailService {

    @Autowired
    private PetDetailMapper petDetailMapper;

    /**
     * 通过宠物id作为外键去查询宠物详情
     * @param petId
     * @return
     */
    @Override
    public PetDetail findByPetId(Long petId) {
        return petDetailMapper.findByPetId(petId);
    }
}
